/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    padding: 20px;
}

/* 响应式布局 */
header, main, footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

header {
    text-align: center;
}

header h1 {
    color: #2c3e50;
}

main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.task-form, .task-list {
    padding: 15px;
}

.task-form h2, .task-list h2 {
    margin-bottom: 10px;
    color: #34495e;
}

form {
    display: flex;
    gap: 10px;
}

input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #2980b9;
}

ul {
    list-style-type: none;
}

li {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

li:last-child {
    border-bottom: none;
}

li button {
    background-color: #e74c3c;
    padding: 5px 10px;
}

li button:hover {
    background-color: #c0392b;
}

footer {
    text-align: center;
    font-size: 0.9em;
    color: #7f8c8d;
}

/* 媒体查询：移动设备适配 */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    header, main, footer {
        padding: 15px;
    }
    
    form {
        flex-direction: column;
    }
    
    input[type="text"], button {
        width: 100%;
    }
}